<? if ( $this->searchResult ) : ?>
	<? foreach ( $this->searchResult as $treeNode ): ?>
	<?php
		$nodeId = $treeNode->id;
	?>

		<? if ( empty ( $nodeId ) ) : ?>
			<a class='ajax' href="/catalog/add/p/0" ><?= _('Create root'); ?></a>
			<? continue; 
		endif; ?>
		<p>
			<?= str_repeat( '&nbsp;', ($treeNode->level-1)*3 )?>
			<?= $treeNode->path; ?> - 
			<a href="/catalog/index/p/<?= $nodeId; ?>"><?= $treeNode->title; ?></a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
			<a class='ajax' href="/catalog/add/p/<?= $nodeId; ?>"><?= _('Add child'); ?></a>
			&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
			<a class='ajax' href="/catalog/del/p/<?= $nodeId; ?>" callback="catalogTree.treeUpdate"><?= _('Del'); ?></a>
			&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
			<a class='ajax' href="/catalog/edit/p/<?= $nodeId; ?>" ><?= _('Edit'); ?></a>
		</p>
	<? endforeach; ?>
<? endif; ?>